package br.com.pentagrama.service.ui.component;

import java.awt.Container;
import java.awt.event.MouseListener;

import javax.swing.Box;
import javax.swing.JButton;

public class ControlRow {

	private JButton addButton;
	private JButton removeButton;
	
	private Box box;
	
	public ControlRow(MouseListener addButtonClickEvent, MouseListener removeButtonClickEvent) {
		box = Box.createHorizontalBox();
		addButton = new JButton("+");
		addButton.addMouseListener(addButtonClickEvent);
		removeButton = new JButton("-");
		removeButton.addMouseListener(removeButtonClickEvent);
	}
	
	public void showIn(Container container) {
		box.add(removeButton);
		box.add(Box.createHorizontalStrut(25));
		box.add(addButton);
		box.add(Box.createHorizontalGlue());
		container.add(box);
	}
}
